define(
		[ "PDUtilDir/util", "PDUtilDir/tool", "PDUtilDir/slidebar",
				"PDUtilDir/inputSelect" ],
		function(Util, Tool, Slidebar, inputSelect, MFU) {
			function detailSupportInit($scope, $compile) {
				return new detailSupport($scope, $compile);
			}
			function detailSupport($scope, $compile) {
				this.$scope = $scope;
				this.$compile = $compile;
			}
			detailSupport.fn = detailSupport.prototype;
			detailSupport.fn.digest = function() {
				this.$scope.$digest();
			};
			detailSupport.fn.init = function(id) {
				var _this = this;
			    $.ajax({
					url : getServer() + "/flea/hclv/serviceOrder/getOrderByOApplyId.htmls",
					data: {
				    	model : id,
				    },
					success : function(data) {
						_this.entity = data.data;
						_this.entity.orderStatusName = _this.$scope.cache.statusMap.get(_this.entity.status);
						if(_this.$scope.cache.payStatus.length == 0){
							_this.queryPayStatus();
						}else{
							_this.entity.payStatusName = _this.$scope.cache.payStatusMap.get(_this.entity.payStatus);
							_this.digest();
						}
					}
				});
			};
			detailSupport.fn.run = function(id) {
				var _this = this;
				_this.init(id);
				this.slidebars = Slidebar({
					size : 'lg',
					url : getServer() + "/static/app/order/receivedAusoInfos/views/detail.html",
//					close : true,
					$scope : this.$scope,
					$compile : this.$compile,
					afterLoad : function($Panel) {
						_this.initialization();
					}
				});
			};
			detailSupport.fn.initialization = function() {};
			detailSupport.fn.queryPayStatus = function() {
				var _this = this;
				// 状态
				$.ajax({
					url : getServer() + "/flea/hclv/getServiceOrgderStatus.htmls",
					success : function(data) {
						_this.$scope.cache.payStatus = data.data;
						$.each(data.data, function(index, row) {
							_this.$scope.cache.payStatusMap.set(row.dictCode, row.dictName);
						});
						_this.entity.payStatusName = _this.$scope.cache.payStatusMap.get(_this.entity.payStatus);
						_this.digest();
					}
				});
			};
			return detailSupportInit;
		});